<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
<div class="subnav" style="margin-bottom:20px;">
    <a href="">首页</a> &gt; <a href="">客户管理</a> &gt; <a href="">银行管理</a>
</div>
<div class="x-body">
	<div id="searchid" class="layui-clear">
		<form name="searchform" class="layui-form" action="?" method="get" >
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
			<div class="left" style="width:100px;">
				<select name="status"  style="margin:0 0 20px 5px;">
					<option value="0">选择状态</option>
					{loop $statuss as $key => $val}
						{_ !$key && $key = -1}
                    <option value="{$key}"{if $status == $key} selected="selected"{/if} >{$val}</option>
                    {/loop}
				</select>
			</div>
			<div class="left margin-l10">
				<input name="title" id="title" type="text" value="{$title}" class="layui-input" style="width:260px;" placeholder="请输入关键词" />
			</div>
			<div class="left margin-l10">
				<input type="submit" name="search" class="layui-btn" value="搜索" />
			</div>
		</form>
	</div>
	
	<table class="layui-table">
		<thead>
			<tr>
				<th>ID</th>
				<th>账号</th>
				<th>银行</th>
				<th>卡号</th>
				<th>持卡人</th>
				<th>添加时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody id="datalist">
			{loop $data as $val}
			<tr>
				<td>{$val['id']}</td>
				<td><a href="?m={$m}&c={$c}&uid={$val['uid']}">{$val['username']}</a></td>
				<td>{$bankListIdKey[$val['bank']]['name']}</td>
				<td>{$val['bankcard']}</td>
				<td>{$val['truename']}</td>
				<td>{date('Y/m/d H:i:s',$val['dateline'])}</td>
				<td>{$statuss[$val['status']]}</td>
				<td>
					{if $val['status']}
					<a href="?m={$m}&c={$c}&a=del&id={$val['id']}" class="red a-ajax">删除</a>					
					{else}
					<a href="?m={$m}&c={$c}&a=del&flag=1&id={$val['id']}" class="a-ajax">启用</a>
					{/if}
				</td>
			</tr>
			{/loop}
		</tbody>
	</table>
	<div class="layui-clear">
		<div id="pages" class="layui-laypage right">{$multi}</div>		
	</div>
</div>

<script>
	$().ready(function(){
		$('.a-ajax').click(function(){
			$.get($(this).attr('href'),function(){
				location.reload();
			});
		})
	});
</script>

{template index/footer}